@using MvcCms.Service.Helpers

@if (Context.User != null && Context.User.Identity != null && Context.User.Identity.IsAuthenticated)
{     
    <h3 class="headerbar">Account - @MvcHtmlString.Create(Context.User.Identity.Name)</h3>
}
else
{
    <h3 class="headerbar">Account</h3>
}
<ul>
    @{
        var classTag = "";
        if (Context.User != null && Context.User.Identity != null && Context.User.Identity.IsAuthenticated)
        {
            if (Roles.IsUserInRole("PortalAdmin"))
            {
                if (Html.IsCurrentAction("FileManager", "home"))
                {
                        <li class="current">@Html.AreaActionLink("Secure Upload", "files", "secure")</li>            
                }
                else
                {
                        <li>@Html.AreaActionLink("Secure Upload", "files", "secure")</li>           
                }
            }

            if (Html.IsCurrentAction("MyHelpDesk", "Ticket")) { classTag = "class=current"; } else { classTag = ""; }
            <li @classTag>@Html.AreaActionLink("Help Desk", "MyHelpDesk", "Ticket", new { area = "MvcCmsProjectTracker" })</li> 
                    
            if (Html.IsCurrentAction("UserProfile", "Account")) { classTag = "class=current"; } else { classTag = ""; }
            <li @classTag>@Html.AreaActionLink("Edit Profile", "UserProfile", "Account")</li>   
                
            if (Html.IsCurrentAction("ChangePassword", "Account")) { classTag = "class=current"; } else { classTag = ""; }
            <li @classTag>@Html.AreaActionLink("Change Password", "ChangePassword", "Account")</li>  
                     
            if (Html.IsCurrentAction("Logoff", "Account")) { classTag = "class=current"; } else { classTag = ""; }
            <li @classTag>@Html.AreaActionLink("Logoff", "Logoff", "Account")</li>     
        }
        else
        {
            if (Html.IsCurrentAction("Logon", "Account")) { classTag = "class=current"; } else { classTag = ""; }
            <li @classTag>@Html.AreaActionLink("Logon", "Logon", "Account")</li>   
                
            if (Html.IsCurrentAction("Register", "Account")) { classTag = "class=current"; } else { classTag = ""; }
            <li @classTag>@Html.AreaActionLink("Register", "Register", "Account")</li> 
                
            if (Html.IsCurrentAction("ResetPassword", "Account")) { classTag = "class=current"; } else { classTag = ""; }
            <li @classTag>@Html.AreaActionLink("Reset Password", "ResetPassword", "Account")</li>
        }
    }
</ul>
